<template>
  <view>
    <nav-bar :title="pageTitle"></nav-bar>
    <view class="content">
      <scroll-view scroll-y :style="{ height: scrollHeight }">
        <image
          :class="[pageTitle === '免费筛查' ? 'free-img' : 'content-img']"
          :src="baseImgUrl + (pageTitle === '免费筛查' ? '/userImg/img_free_screening_bg1.jpg' : '/userImg/img_free_screening_bg.jpg')"
          :mode="pageTitle === '免费筛查' ? 'widthFix' : 'aspectFill'"
          :show-menu-by-longpress="true"
        />
      </scroll-view>
    </view>
  </view>
</template>

<script>
  import { baseImgUrl } from '@/config'
  export default {
    name: 'FreeScreening',
    data() {
      return {
        baseImgUrl,
        scrollHeight: '',
        pageTitle: ''
      }
    },
    onLoad(options) {
      this.scrollHeight = this.$store.getters.heightData.noTabMainHeight - 0 + 'px'
      this.pageTitle = options.title
    },

    methods: {
    }
  }
</script>
<style lang="scss" scoped>
  .content{
    width: 100%;
    padding: 0;
    .free-img {
      width: 100vw;
    }
    .content-img {
      width: 100vw;
      height: 100%;
    }
  }
</style>
